<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>common_util: src/common_util/strfmt.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">common_util<span id="projectnumber">&#160;1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_2961cad218251a7c35c6867350b80887.html">common_util</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">strfmt.h File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>String format functions. this file defines a series of string-formatted functions.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;sstream&gt;</code><br />
<code>#include &lt;iomanip&gt;</code><br />
<code>#include &quot;<a class="el" href="timeutil_8h_source.html">timeutil.h</a>&quot;</code><br />
</div>
<p><a href="strfmt_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2e78cd1710a89e2f94f496bc47cd2d46" id="r_a2e78cd1710a89e2f94f496bc47cd2d46"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a2e78cd1710a89e2f94f496bc47cd2d46">cutl::fmt_uint</a> (uint64_t val, uint8_t width=0, char fill='0')</td></tr>
<tr class="memdesc:a2e78cd1710a89e2f94f496bc47cd2d46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format uint64 value to a string with a given width and fill character.  <br /></td></tr>
<tr class="separator:a2e78cd1710a89e2f94f496bc47cd2d46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b0341d973ea969f0d90e55f4a1771e1" id="r_a9b0341d973ea969f0d90e55f4a1771e1"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a9b0341d973ea969f0d90e55f4a1771e1">cutl::fmt_double</a> (double val, int precision=2)</td></tr>
<tr class="memdesc:a9b0341d973ea969f0d90e55f4a1771e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format double value to a string with a given precision.  <br /></td></tr>
<tr class="separator:a9b0341d973ea969f0d90e55f4a1771e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a2a174ed592af8186835cd0da50a384" id="r_a9a2a174ed592af8186835cd0da50a384"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a9a2a174ed592af8186835cd0da50a384">cutl::fmt_filesize</a> (uint64_t size, bool simplify=true, int precision=1)</td></tr>
<tr class="memdesc:a9a2a174ed592af8186835cd0da50a384"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a file size to a human-readable string with a given precision.  <br /></td></tr>
<tr class="separator:a9a2a174ed592af8186835cd0da50a384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4b5055b2dc7e9ccdb2d611d81b8d98" id="r_aac4b5055b2dc7e9ccdb2d611d81b8d98"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#aac4b5055b2dc7e9ccdb2d611d81b8d98">cutl::fmt_timeduration_s</a> (uint64_t seconds)</td></tr>
<tr class="memdesc:aac4b5055b2dc7e9ccdb2d611d81b8d98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a time duration to a human-readable string.  <br /></td></tr>
<tr class="separator:aac4b5055b2dc7e9ccdb2d611d81b8d98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6111cd3f5b98a59f6c77b00a0d1dc6c" id="r_ad6111cd3f5b98a59f6c77b00a0d1dc6c"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#ad6111cd3f5b98a59f6c77b00a0d1dc6c">cutl::fmt_timeduration_ms</a> (uint64_t microseconds)</td></tr>
<tr class="memdesc:ad6111cd3f5b98a59f6c77b00a0d1dc6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a time duration to a human-readable string.  <br /></td></tr>
<tr class="separator:ad6111cd3f5b98a59f6c77b00a0d1dc6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a677609cff8def1c22e0a85d823efe811" id="r_a677609cff8def1c22e0a85d823efe811"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a677609cff8def1c22e0a85d823efe811">cutl::fmt_timeduration_us</a> (uint64_t nanoseconds)</td></tr>
<tr class="memdesc:a677609cff8def1c22e0a85d823efe811"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a time duration to a human-readable string.  <br /></td></tr>
<tr class="separator:a677609cff8def1c22e0a85d823efe811"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fcf54de43bce48a76b654c599b1a9a6" id="r_a3fcf54de43bce48a76b654c599b1a9a6"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a3fcf54de43bce48a76b654c599b1a9a6">cutl::fmt_timestamp</a> (uint64_t second, bool local, const std::string &amp;fmt)</td></tr>
<tr class="memdesc:a3fcf54de43bce48a76b654c599b1a9a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a timestamp to a human-readable string with a given format.  <br /></td></tr>
<tr class="separator:a3fcf54de43bce48a76b654c599b1a9a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19def540b218ad8b392c77ac0bf0f9e8" id="r_a19def540b218ad8b392c77ac0bf0f9e8"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a19def540b218ad8b392c77ac0bf0f9e8">cutl::fmt_timestamp_s</a> (uint64_t second, bool local=true)</td></tr>
<tr class="memdesc:a19def540b218ad8b392c77ac0bf0f9e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a timestamp to a human-readable string.  <br /></td></tr>
<tr class="separator:a19def540b218ad8b392c77ac0bf0f9e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a003c7af3c7c683a60a11ff0cde64365f" id="r_a003c7af3c7c683a60a11ff0cde64365f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a003c7af3c7c683a60a11ff0cde64365f">cutl::fmt_timestamp_ms</a> (uint64_t <a class="el" href="timeutil_8h.html#a5123cf2b94c1fabe15fb9ba61231d5f1aee33e909372d935d190f4fcb2a92d542">ms</a>, bool local=true)</td></tr>
<tr class="memdesc:a003c7af3c7c683a60a11ff0cde64365f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a timestamp to a human-readable string.  <br /></td></tr>
<tr class="separator:a003c7af3c7c683a60a11ff0cde64365f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5e1423e9aff8e23357419d27380ba13" id="r_ab5e1423e9aff8e23357419d27380ba13"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#ab5e1423e9aff8e23357419d27380ba13">cutl::fmt_timestamp_us</a> (uint64_t <a class="el" href="timeutil_8h.html#a5123cf2b94c1fabe15fb9ba61231d5f1a0b3b97fa66886c5688ee4ae80ec0c3c2">us</a>, bool local=true)</td></tr>
<tr class="memdesc:ab5e1423e9aff8e23357419d27380ba13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a timestamp to a human-readable string.  <br /></td></tr>
<tr class="separator:ab5e1423e9aff8e23357419d27380ba13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af36c89420f606dcf367cab2d71bb189f" id="r_af36c89420f606dcf367cab2d71bb189f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#af36c89420f606dcf367cab2d71bb189f">cutl::to_hex</a> (const uint8_t *data, size_t len, bool upper=true, char separator=' ')</td></tr>
<tr class="memdesc:af36c89420f606dcf367cab2d71bb189f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format data to a hex string.  <br /></td></tr>
<tr class="separator:af36c89420f606dcf367cab2d71bb189f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69d9afe63b32912e5dd8191277177efa" id="r_a69d9afe63b32912e5dd8191277177efa"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a69d9afe63b32912e5dd8191277177efa">cutl::to_hex</a> (uint8_t value, bool upper=true, const std::string &amp;prefix=&quot;&quot;)</td></tr>
<tr class="memdesc:a69d9afe63b32912e5dd8191277177efa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a uint8_t value to a hex string.  <br /></td></tr>
<tr class="separator:a69d9afe63b32912e5dd8191277177efa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afee308b97fbeadfab3ee50192f0c1bd3" id="r_afee308b97fbeadfab3ee50192f0c1bd3"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#afee308b97fbeadfab3ee50192f0c1bd3">cutl::to_hex</a> (uint16_t value, bool upper=true, const std::string &amp;prefix=&quot;&quot;)</td></tr>
<tr class="memdesc:afee308b97fbeadfab3ee50192f0c1bd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a uint16_t value to a hex string.  <br /></td></tr>
<tr class="separator:afee308b97fbeadfab3ee50192f0c1bd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11eceeb09277084a3eb986e2f6a544e7" id="r_a11eceeb09277084a3eb986e2f6a544e7"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a11eceeb09277084a3eb986e2f6a544e7">cutl::to_hex</a> (uint32_t value, bool upper=true, const std::string &amp;prefix=&quot;&quot;)</td></tr>
<tr class="memdesc:a11eceeb09277084a3eb986e2f6a544e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a uint32_t value to a hex string.  <br /></td></tr>
<tr class="separator:a11eceeb09277084a3eb986e2f6a544e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a921ce1ac6968f6e45e0faf00109f329f" id="r_a921ce1ac6968f6e45e0faf00109f329f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a921ce1ac6968f6e45e0faf00109f329f">cutl::to_hex</a> (uint64_t value, bool upper=true, const std::string &amp;prefix=&quot;&quot;)</td></tr>
<tr class="memdesc:a921ce1ac6968f6e45e0faf00109f329f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a uint64_t value to a hex string.  <br /></td></tr>
<tr class="separator:a921ce1ac6968f6e45e0faf00109f329f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0fcf92ddbc589cd425dcd268b3ec0fb" id="r_ac0fcf92ddbc589cd425dcd268b3ec0fb"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#ac0fcf92ddbc589cd425dcd268b3ec0fb">cutl::to_bin</a> (uint8_t value, char separator=',')</td></tr>
<tr class="memdesc:ac0fcf92ddbc589cd425dcd268b3ec0fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format uint8_t value to a binary string.  <br /></td></tr>
<tr class="separator:ac0fcf92ddbc589cd425dcd268b3ec0fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71f370257e90b2cd1942fbde6b59bf00" id="r_a71f370257e90b2cd1942fbde6b59bf00"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a71f370257e90b2cd1942fbde6b59bf00">cutl::to_bin</a> (uint16_t value, char separator=' ')</td></tr>
<tr class="memdesc:a71f370257e90b2cd1942fbde6b59bf00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format uint16_t value to a binary string.  <br /></td></tr>
<tr class="separator:a71f370257e90b2cd1942fbde6b59bf00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdda5ff14a10315c15a9101fb30c61e1" id="r_afdda5ff14a10315c15a9101fb30c61e1"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#afdda5ff14a10315c15a9101fb30c61e1">cutl::to_bin</a> (uint32_t value, char separator=' ')</td></tr>
<tr class="memdesc:afdda5ff14a10315c15a9101fb30c61e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format uint32_t value to a binary string.  <br /></td></tr>
<tr class="separator:afdda5ff14a10315c15a9101fb30c61e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a206058d4c39d850add094c2eb56bfd5d" id="r_a206058d4c39d850add094c2eb56bfd5d"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="strfmt_8h.html#a206058d4c39d850add094c2eb56bfd5d">cutl::to_bin</a> (uint64_t value, char separator=' ')</td></tr>
<tr class="memdesc:a206058d4c39d850add094c2eb56bfd5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format uint64_t value to a binary string.  <br /></td></tr>
<tr class="separator:a206058d4c39d850add094c2eb56bfd5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>String format functions. this file defines a series of string-formatted functions. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2024, Spencer.Luo. All Rights Reserved.</dd></dl>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at </p><pre class="fragment">  http://www.apache.org/licenses/LICENSE-2.0
</pre><p> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.</p>
<dl class="section author"><dt>Author</dt><dd>spencer.luo </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024-05-13 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a9b0341d973ea969f0d90e55f4a1771e1" name="a9b0341d973ea969f0d90e55f4a1771e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b0341d973ea969f0d90e55f4a1771e1">&#9670;&#160;</a></span>fmt_double()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_double </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>precision</em> = <code>2</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format double value to a string with a given precision. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">val</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">precision</td><td>the precision of the formatted string, default is 2. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a9a2a174ed592af8186835cd0da50a384" name="a9a2a174ed592af8186835cd0da50a384"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a2a174ed592af8186835cd0da50a384">&#9670;&#160;</a></span>fmt_filesize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_filesize </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>simplify</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>precision</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a file size to a human-readable string with a given precision. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>the size to be formatted. </td></tr>
    <tr><td class="paramname">simplify</td><td>whether to use a simplify unit. </td></tr>
    <tr><td class="paramname">precision</td><td>the precision of the formatted string, default is 1. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="ad6111cd3f5b98a59f6c77b00a0d1dc6c" name="ad6111cd3f5b98a59f6c77b00a0d1dc6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6111cd3f5b98a59f6c77b00a0d1dc6c">&#9670;&#160;</a></span>fmt_timeduration_ms()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timeduration_ms </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>microseconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a time duration to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">microseconds</td><td>the duration in microseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="aac4b5055b2dc7e9ccdb2d611d81b8d98" name="aac4b5055b2dc7e9ccdb2d611d81b8d98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac4b5055b2dc7e9ccdb2d611d81b8d98">&#9670;&#160;</a></span>fmt_timeduration_s()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timeduration_s </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a time duration to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">seconds</td><td>the duration in seconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a677609cff8def1c22e0a85d823efe811" name="a677609cff8def1c22e0a85d823efe811"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a677609cff8def1c22e0a85d823efe811">&#9670;&#160;</a></span>fmt_timeduration_us()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timeduration_us </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>nanoseconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a time duration to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nanoseconds</td><td>the duration in nanoseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a3fcf54de43bce48a76b654c599b1a9a6" name="a3fcf54de43bce48a76b654c599b1a9a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fcf54de43bce48a76b654c599b1a9a6">&#9670;&#160;</a></span>fmt_timestamp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timestamp </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>second</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>local</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fmt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a timestamp to a human-readable string with a given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">second</td><td>the timestamp in seconds. </td></tr>
    <tr><td class="paramname">local</td><td>whether to use local time or UTC time, default is local time. If local is true, the function will format the timestamp to local time, otherwise, it will format the timestamp to UTC time. </td></tr>
    <tr><td class="paramname">fmt</td><td>the format of the formatted string. useage like std::put_time, see <a href="https://en.cppreference.com/w/cpp/io/manip/put_time">https://en.cppreference.com/w/cpp/io/manip/put_time</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a003c7af3c7c683a60a11ff0cde64365f" name="a003c7af3c7c683a60a11ff0cde64365f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a003c7af3c7c683a60a11ff0cde64365f">&#9670;&#160;</a></span>fmt_timestamp_ms()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timestamp_ms </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>local</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a timestamp to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ms</td><td>the timestamp in milliseconds. </td></tr>
    <tr><td class="paramname">local</td><td>whether to use local time or UTC time, default is local time. If local is true, the function will format the timestamp to local time, otherwise, it will format the timestamp to UTC time. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a19def540b218ad8b392c77ac0bf0f9e8" name="a19def540b218ad8b392c77ac0bf0f9e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19def540b218ad8b392c77ac0bf0f9e8">&#9670;&#160;</a></span>fmt_timestamp_s()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timestamp_s </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>second</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>local</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a timestamp to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">second</td><td>the timestamp in seconds. </td></tr>
    <tr><td class="paramname">local</td><td>whether to use local time or UTC time, default is local time. If local is true, the function will format the timestamp to local time, otherwise, it will format the timestamp to UTC time. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="ab5e1423e9aff8e23357419d27380ba13" name="ab5e1423e9aff8e23357419d27380ba13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5e1423e9aff8e23357419d27380ba13">&#9670;&#160;</a></span>fmt_timestamp_us()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_timestamp_us </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>local</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a timestamp to a human-readable string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">us</td><td>the timestamp in microseconds. </td></tr>
    <tr><td class="paramname">local</td><td>whether to use local time or UTC time, default is local time. If local is true, the function will format the timestamp to local time, otherwise, it will format the timestamp to UTC time. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a2e78cd1710a89e2f94f496bc47cd2d46" name="a2e78cd1710a89e2f94f496bc47cd2d46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e78cd1710a89e2f94f496bc47cd2d46">&#9670;&#160;</a></span>fmt_uint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::fmt_uint </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>width</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>fill</em> = <code>'0'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format uint64 value to a string with a given width and fill character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">val</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">width</td><td>the width of the formatted string. </td></tr>
    <tr><td class="paramname">fill</td><td>the fill character of the formatted string, default is '0'. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a71f370257e90b2cd1942fbde6b59bf00" name="a71f370257e90b2cd1942fbde6b59bf00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71f370257e90b2cd1942fbde6b59bf00">&#9670;&#160;</a></span>to_bin() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_bin </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>separator</em> = <code>'&#160;'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format uint16_t value to a binary string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">separator</td><td>the separator between each pair of binary characters, default is space. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="afdda5ff14a10315c15a9101fb30c61e1" name="afdda5ff14a10315c15a9101fb30c61e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdda5ff14a10315c15a9101fb30c61e1">&#9670;&#160;</a></span>to_bin() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_bin </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>separator</em> = <code>'&#160;'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format uint32_t value to a binary string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">separator</td><td>the separator between each pair of binary characters, default is space. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a206058d4c39d850add094c2eb56bfd5d" name="a206058d4c39d850add094c2eb56bfd5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a206058d4c39d850add094c2eb56bfd5d">&#9670;&#160;</a></span>to_bin() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_bin </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>separator</em> = <code>'&#160;'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format uint64_t value to a binary string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">separator</td><td>the separator between each pair of binary characters, default is space. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="ac0fcf92ddbc589cd425dcd268b3ec0fb" name="ac0fcf92ddbc589cd425dcd268b3ec0fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0fcf92ddbc589cd425dcd268b3ec0fb">&#9670;&#160;</a></span>to_bin() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_bin </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>separator</em> = <code>','</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format uint8_t value to a binary string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">separator</td><td>the separator between each pair of binary characters, default is comma. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="af36c89420f606dcf367cab2d71bb189f" name="af36c89420f606dcf367cab2d71bb189f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af36c89420f606dcf367cab2d71bb189f">&#9670;&#160;</a></span>to_hex() <span class="overload">[1/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_hex </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>upper</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>separator</em> = <code>'&#160;'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format data to a hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>the data to be formatted. </td></tr>
    <tr><td class="paramname">len</td><td>the length of the data. </td></tr>
    <tr><td class="paramname">upper</td><td>whether to use upper case or lower case for hex characters, default is upper case. </td></tr>
    <tr><td class="paramname">separator</td><td>the separator between each pair of hex characters, default is space. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="afee308b97fbeadfab3ee50192f0c1bd3" name="afee308b97fbeadfab3ee50192f0c1bd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afee308b97fbeadfab3ee50192f0c1bd3">&#9670;&#160;</a></span>to_hex() <span class="overload">[2/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_hex </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>upper</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>prefix</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a uint16_t value to a hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">upper</td><td>whether to use upper case or lower case for hex characters, default is upper case. </td></tr>
    <tr><td class="paramname">prefix</td><td>the prefix of the formatted string, default is empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a11eceeb09277084a3eb986e2f6a544e7" name="a11eceeb09277084a3eb986e2f6a544e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11eceeb09277084a3eb986e2f6a544e7">&#9670;&#160;</a></span>to_hex() <span class="overload">[3/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_hex </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>upper</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>prefix</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a uint32_t value to a hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">upper</td><td>whether to use upper case or lower case for hex characters, default is upper case. </td></tr>
    <tr><td class="paramname">prefix</td><td>the prefix of the formatted string, default is empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a921ce1ac6968f6e45e0faf00109f329f" name="a921ce1ac6968f6e45e0faf00109f329f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a921ce1ac6968f6e45e0faf00109f329f">&#9670;&#160;</a></span>to_hex() <span class="overload">[4/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_hex </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>upper</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>prefix</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a uint64_t value to a hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">upper</td><td>whether to use upper case or lower case for hex characters, default is upper case. </td></tr>
    <tr><td class="paramname">prefix</td><td>the prefix of the formatted string, default is empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
<a id="a69d9afe63b32912e5dd8191277177efa" name="a69d9afe63b32912e5dd8191277177efa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69d9afe63b32912e5dd8191277177efa">&#9670;&#160;</a></span>to_hex() <span class="overload">[5/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string cutl::to_hex </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>upper</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>prefix</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Format a uint8_t value to a hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>the value to be formatted. </td></tr>
    <tr><td class="paramname">upper</td><td>whether to use upper case or lower case for hex characters, default is upper case. </td></tr>
    <tr><td class="paramname">prefix</td><td>the prefix of the formatted string, default is empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::string the formatted string. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
